package com.guozcc.bootweb.platform.dto.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "ResultVO",description = "响应报文")
public class ResultVO<T> {

    @ApiModelProperty(value = "响应头信息",dataType = "com.guozcc.bootweb.platform.dto.response.Head")
    private Head head;

    @ApiModelProperty(value = "响应数据",dataType = "java.lang.Object")
    private T data;



    public ResultVO(String errcode,String errmsg,T data){
        this.head = new Head(errcode,errmsg);
        this.data = data;
    }

    public ResultVO(String errcode,T data){
        this(errcode,null,data);
    }

    public ResultVO(Head head){
        this.head = head;
    }

    public Head getHead() {
        return head;
    }

    public void setHead(Head head) {
        this.head = head;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
